<template lang="">
  <el-drawer size="80%" v-model="formDialogVisible" title="数据更新">
    <ComUpdate
      v-if="currentForm && formDialogVisible"
      :dataCode="code"
      :dataId="currentForm.id"
      :fixParam="fixParam"
      @close="comClose"
    ></ComUpdate>
  </el-drawer>
</template>
<script>
import ComUpdate from "./components/update/data-form.vue";
export default {
  components: { ComUpdate },
  props: {
    code: {
      type: String,
      default: "",
    },
    fixParam: {
      type: Object,
      default: () => {},
    },
    currentForm: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      formDialogVisible: false,
    };
  },
  methods: {
    comClose(arg) {
      this.$emit("syncClose", arg);
      this.formDialogVisible = false;
    },
    open() {
      this.formDialogVisible = true;
    },
  },
};
</script>
<style lang=""></style>
